import { Button, Card, Space, Table } from "antd";


const columns = [
    {
        title: '服务id',
        dataIndex: 'id',
        key: 'id',
    },
    {
        title: '服务名',
        dataIndex: 'name',
        key: 'name',
    },
    {
        title: '服务地址',
        dataIndex: 'address',
        key: 'address',
    },
    {
        title: '操作',
        key: 'action',
        render: (_, record) => (
            <Space size="middle">
                <Button type="link">更新服务</Button>
                <Button type="link">安装依赖</Button>
                <Button type="primary">启动服务</Button>
                <Button type="default" danger>停止服务</Button>
                <Button type="dashed">查看日志</Button>
            </Space>
        ),
    },
];

const ServiceList: React.FC = () => {

    const dataSource = [
        {
            key: '1',
            name: 'nestjs-admin',
            age: 32,
            address: '西湖区湖底公园1号',
        },
        {
            key: '2',
            name: '胡彦祖',
            age: 42,
            address: '西湖区湖底公园1号',
        },
    ];



    return (
        <Card title="Service List">
            <Table dataSource={dataSource} columns={columns} />;
        </Card>
    );
};

export default ServiceList